package com.dgut.hisystem.service.impl;

import com.dgut.hisystem.entity.Prescription;
import com.dgut.hisystem.mapper.PrescriptionMapper;
import com.dgut.hisystem.service.PrescriptionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class PrescriptionServiceImpl implements PrescriptionService {
    @Resource
    private PrescriptionMapper prescriptionMapper;

    @Override
    public Prescription getPrescriptionById(long id) {
        return prescriptionMapper.getPrescriptionById(id);
    }

    @Override
    public void insert(Prescription prescription) {
        prescriptionMapper.insert(prescription);
    }

    @Override
    public void update(Prescription prescription) {
        prescriptionMapper.update(prescription);
    }

    @Override
    public void delete(long id) {
        prescriptionMapper.delete(id);
    }
}
